from db import utils
from logger import logger
from sub_events.base_event import BaseEvent

LOGGER = logger.CustomLogger()

class GetHeaderFileCheckStatusEvent(BaseEvent):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.event_name_zh: str = "头文件引用计数检查"
        self.event_name_en: str = "Header File Check"

    def execute(self) :
        force_status = utils.get_force_pass_status_by_hook(self.hook, self.event_name_en)
        if not force_status:
            self.failed = True
            self.comment = "头文件引用检查失败, 请参考wiki处理：https://gitcode.com/openharmony/arkui_ace_engine/wiki/arkui_ace_engine%E4%BB%93%E5%BA%93%E5%A2%9E%E5%BC%BA%E9%97%A8%E7%A6%81%E6%A3%80%E6%9F%A5%E8%AF%B4%E6%98%8E.md#%E5%A4%B4%E6%96%87%E4%BB%B6%E5%BC%95%E7%94%A8%E6%AC%A1%E6%95%B0%E6%A3%80%E6%9F%A5%E8%AF%A6%E7%BB%86%E8%AF%B4%E6%98%8E"
